package com.aoip.telemetry.telemetry.entity.pipeline;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;

import java.time.LocalDateTime;

/**
 * 测站信息配置表
 *
 * @author chenbai
 * @version 1.0
 * @date 2021/7/12 3:14
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@ToString
@Builder
@TableName("pipeline_handle")
@ApiModel(description = "处理器类基本信息表")
public class PipelineHandleEntity {
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    @ApiModelProperty("处理器规则主键")
    private String id;

    @TableField(value = "handle_name")
    @ApiModelProperty("处理器名称，默认处理器类小写字母开头类名称")
    private String handleName;

    @TableField(value = "handle_desc")
    @ApiModelProperty("处理器说明")
    private String handleDesc;

    @TableField(value = "handle_type")
    @ApiModelProperty("处理器类型（jar,local）")
    private String handleType;

    @TableField(value = "class_name")
    @ApiModelProperty("类名称")
    private String className;

    @TableField(value = "file_path")
    @ApiModelProperty("文件地址")
    private String filePath;

    @TableField(value = "file_id")
    @ApiModelProperty("文件id(针对处理器类型为jar时，上传jar的文件id)")
    private String fileId;

    @ApiModelProperty(value = "是否有效（0：正常，1：无效）")
    @TableField("valid")
    private Integer valid;

    @TableField(value = "create_time", fill = FieldFill.INSERT)
    @ApiModelProperty("创建时间")
    private LocalDateTime createTime;

    @TableField(value = "modify_time", fill = FieldFill.INSERT_UPDATE)
    @ApiModelProperty("修改时间")
    private LocalDateTime modifyTime;

    @TableField(value = "del_flag", fill = FieldFill.INSERT)
    @ApiModelProperty("是否删除（0：正常，1：删除）")
    @TableLogic
    private Integer delFlag;

    @TableField(value = "bz")
    @ApiModelProperty("备注信息")
    private String bz;
}
